# Contributor: xcko <xcko@airmail.cc>
# Maintainer: xcko <xcko@airmail.cc>
pkgname=mpop
pkgver=1.4.18
pkgrel=0
pkgdesc="retrieves mail from pop3 mailboxes"
url="https://marlam.de/mpop"
arch="all"
license="GPL-3.0-or-later"
options="!check" # no test suite
makedepends="gettext-dev gnutls-dev libsecret-dev libidn2-dev"
subpackages="$pkgname-doc $pkgname-lang $pkgname-vim:vim:noarch"
source="https://marlam.de/mpop/releases/mpop-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

vim() {
	pkgdesc="Vim syntax for $pkgname"

	install -Dm644 "$builddir"/scripts/vim/$pkgname.vim \
		"$subpkgdir"/usr/share/vim/vimfiles/syntax/$pkgname.vim
}

sha512sums="
4f20d3653c99361269011162df6a5d2b2f73d7e3e4bb62fc24c301a5d12f0e911ff432b2e786d2f49088cb96c273a4961ee514ba48465c0c455937559d2b2cff  mpop-1.4.18.tar.xz
"
